package com.google.code.pokerstats_service;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class PlayerResult {
    /** @see Object#toString */
    @Override
    public String toString() {
        return id + "," + gameId + "," + player + "," + buyIn + "," + cashOut;
    }
    
    /** The result's unique id. */
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    public Long id;
    
    /** The relevant game's unique id. */
    @Persistent
    public Long gameId;
   
    /** The relevant player (Facebook user id). */
    @Persistent
    public Long player;
    
    /** Money invested by player. */
    @Persistent
    public Double buyIn;
    
    /** Money earned by player. */
    @Persistent
    public Double cashOut;
}
